/*
    created: 2023/4/7
    filename: Main.cpp
    author: 李东霖
    purpose: Adapt模式的演示代码  
*/
#include<stdlib.h>
#include"Adapt.h"
int main()
{
    //先测试继承调用
    //由于继承了它，所以直接调用
    Target* adt = new Adapter1;
    adt->Request();

    system("pause");
    //测试组合调用 
    //需要用接口类的指针初始化target派生类的对象来调用 
    Adaptee* ade = new Adaptee;
    Target* tar = new Adapter(ade);
    tar->Request();

    return 0;
}